Permalink
Browse files

Lose js suffix in locutus

  • Loading branch information...
1 parent 53829e7 commit 9aea421087656a4cf42decf9b032f28b145f0fdb @kvz committed May 11, 2016
Showing 657 changed files with 672 additions and 672 deletions.
View
@@ -1,5 +1,5 @@
Copyright (c) 2007-2016 Kevin van Zonneveld (http://kvz.io)
-and Contributors (http://locutusjs.io/authors)
+and Contributors (http://locutus.io/authors)
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
View
@@ -7,7 +7,7 @@
All your standard libraries will be assimilated into our JavaScript collective. Resistance is futile.
-More info at: http://locutusjs.io/
+More info at: http://locutus.io/
## Install
@@ -1,5 +1,5 @@
module.exports = function array () {
- // discuss at: http://locutusjs.io/php/array/
+ // discuss at: http://locutus.io/php/array/
// original by: d3x
// improved by: Brett Zamir (http://brett-zamir.me)
// test: skip-all
@@ -1,5 +1,5 @@
module.exports = function array_uintersect_assoc (arr1) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_uintersect_assoc/
+ // discuss at: http://locutus.io/php/array_uintersect_assoc/
// original by: Brett Zamir (http://brett-zamir.me)
// example 1: var $array1 = {a: 'green', b: 'brown', c: 'blue', 0: 'red'}
// example 1: var $array2 = {a: 'GREEN', B: 'brown', 0: 'yellow', 1: 'red'}
@@ -1,5 +1,5 @@
module.exports = function array_walk_recursive (array, funcname, userdata) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_walk_recursive/
+ // discuss at: http://locutus.io/php/array_walk_recursive/
// original by: Johnny Mast (http://www.phpvrouwen.nl)
// example 1: array_walk_recursive ({'a': 'b', 'c': {'d': 'e'}}, 'void', 'userdata')
// returns 1: true
@@ -1,5 +1,5 @@
module.exports = function compact () {
- // discuss at: http://locutusjs.io/php/compact/
+ // discuss at: http://locutus.io/php/compact/
// original by: Waldo Malqui Silva (http://waldo.malqui.info)
// improved by: Jack
// input by: Brett Zamir (http://brett-zamir.me)
@@ -1,5 +1,5 @@
module.exports = function getlastmod () {
- // discuss at: http://locutusjs.io/php/getlastmod/
+ // discuss at: http://locutus.io/php/getlastmod/
// original by: Brett Zamir (http://brett-zamir.me)
// note: Will not work on browsers which don't support document.lastModified
// example 1: getlastmod()
@@ -1,5 +1,5 @@
module.exports = function time_sleep_until (timestamp) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/time_sleep_until/
+ // discuss at: http://locutus.io/php/time_sleep_until/
// original by: Brett Zamir (http://brett-zamir.me)
// note 1: For study purposes. Current implementation could lock up the user's browser.
// note 1: Expects a timestamp in seconds, so DO NOT pass in a JavaScript timestamp which are in milliseconds (e.g., new Date()) or otherwise the function will lock up the browser 1000 times longer than probably intended.
@@ -1,5 +1,5 @@
module.exports = function preg_grep (pattern, input, flags) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/preg_grep/
+ // discuss at: http://locutus.io/php/preg_grep/
// original by: Brett Zamir (http://brett-zamir.me)
// note: If pass pattern as string, must escape backslashes, even for single quotes
// note: The regular expression itself must be expressed JavaScript style
@@ -1,5 +1,5 @@
module.exports = function get_headers (url, format) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/get_headers/
+ // discuss at: http://locutus.io/php/get_headers/
// original by: Paulo Freitas
// bugfixed by: Brett Zamir (http://brett-zamir.me)
// note: This function uses XmlHttpRequest and cannot retrieve resource from different domain.
@@ -1,5 +1,5 @@
module.exports = function get_meta_tags (file) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/get_meta_tags/
+ // discuss at: http://locutus.io/php/get_meta_tags/
// original by: Brett Zamir (http://brett-zamir.me)
// note: This function uses XmlHttpRequest and cannot retrieve resource from different domain.
// note: Synchronous so may lock up browser, mainly here for study purposes.
@@ -1,5 +1,5 @@
module.exports = function is_resource (handle) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/is_resource/
+ // discuss at: http://locutus.io/php/is_resource/
// original by: Brett Zamir (http://brett-zamir.me)
// improved by: Luis Salazar (http://www.freaky-media.com/)
// example 1: is_resource('a')
@@ -1,5 +1,5 @@
module.exports = function settype (vr, type) {
- // discuss at: http://locutusjs.io/php/settype/
+ // discuss at: http://locutus.io/php/settype/
// original by: Waldo Malqui Silva (http://waldo.malqui.info)
// improved by: Kevin van Zonneveld (http://kvz.io)
// revised by: Brett Zamir (http://brett-zamir.me)
View
@@ -3,7 +3,7 @@
"version": "2.0.2",
"license": "MIT",
"description": "Locutus other languages' stadard libraries to JavaScript for fun and educational purposes",
- "homepage": "http://locutusjs.io",
+ "homepage": "http://locutus.io",
"author": "Kevin van Zonneveld <kevin@vanzonneveld.net>",
"engines": {
"node": ">= 0.10.0"
@@ -18,7 +18,7 @@ __webroot="${__root}/website"
# Only set git user until we verified we're on Travis
# We don't want to change this during local experiments
git config --global user.name 'Locutus Bot'
-git config --global user.email 'bot@locutusjs.io'
+git config --global user.email 'bot@locutus.io'
pushd "${__root}"
sed -i.bak -e "s~git@github.com:kvz/locutus.git~${GHPAGES_URL}~" "${__webroot}/_config.yml"
View
@@ -1,5 +1,5 @@
module.exports = function abs (mixedNumber) {
- // discuss at: http://locutusjs.io/c/abs/
+ // discuss at: http://locutus.io/c/abs/
// original by: Waldo Malqui Silva (http://waldo.malqui.info)
// improved by: Karol Kowalski
// improved by: Kevin van Zonneveld (http://kvz.io)
@@ -1,5 +1,5 @@
module.exports = function Contains (s, substr) {
- // discuss at: http://locutusjs.io/golang/strings/Contains
+ // discuss at: http://locutus.io/golang/strings/Contains
// original by: Kevin van Zonneveld (http://kvz.io)
// example 1: Contains('Kevin', 'K')
// returns 1: true
@@ -1,5 +1,5 @@
module.exports = function Count (s, sep) {
- // discuss at: http://locutusjs.io/php/printf/
+ // discuss at: http://locutus.io/php/printf/
// original by: Kevin van Zonneveld (http://kvz.io)
// input by: GopherJS (http://www.gopherjs.org/)
// example 1: Count("cheese", "e")
@@ -1,5 +1,5 @@
module.exports = function Index (s, sep) {
- // discuss at: http://locutusjs.io/golang/strings/Index
+ // discuss at: http://locutus.io/golang/strings/Index
// original by: Kevin van Zonneveld (http://kvz.io)
// example 1: Index('Kevin', 'K')
// returns 1: 0
@@ -1,5 +1,5 @@
module.exports = function LastIndex (s, sep) {
- // discuss at: http://locutusjs.io/golang/strings/LastIndex
+ // discuss at: http://locutus.io/golang/strings/LastIndex
// original by: Kevin van Zonneveld (http://kvz.io)
// input by: GopherJS (http://www.gopherjs.org/)
// example 1: LastIndex('go gopher', 'go')
@@ -1,5 +1,5 @@
module.exports = function _bc () { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/_helpers/_bc
+ // discuss at: http://locutus.io/php/_helpers/_bc
// original by: lmeyrick (https://sourceforge.net/projects/bcmath-js/)
// improved by: Brett Zamir (http://brett-zamir.me)
// example 1: var $bc = _bc()
@@ -1,5 +1,5 @@
module.exports = function array_change_key_case (array, cs) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_change_key_case/
+ // discuss at: http://locutus.io/php/array_change_key_case/
// original by: Ates Goral (http://magnetiq.com)
// improved by: marrtins
// improved by: Brett Zamir (http://brett-zamir.me)
@@ -1,5 +1,5 @@
module.exports = function array_chunk (input, size, preserveKeys) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_chunk/
+ // discuss at: http://locutus.io/php/array_chunk/
// original by: Carlos R. L. Rodrigues (http://www.jsfromhell.com)
// improved by: Brett Zamir (http://brett-zamir.me)
// note 1: Important note: Per the ECMAScript specification,
@@ -1,5 +1,5 @@
module.exports = function array_combine (keys, values) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_combine/
+ // discuss at: http://locutus.io/php/array_combine/
// original by: Kevin van Zonneveld (http://kvz.io)
// improved by: Brett Zamir (http://brett-zamir.me)
// example 1: array_combine([0,1,2], ['kevin','van','zonneveld'])
@@ -1,5 +1,5 @@
module.exports = function array_count_values (array) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_count_values/
+ // discuss at: http://locutus.io/php/array_count_values/
// original by: Ates Goral (http://magnetiq.com)
// improved by: Michael White (http://getsprink.com)
// improved by: Kevin van Zonneveld (http://kvz.io)
@@ -1,5 +1,5 @@
module.exports = function array_diff (arr1) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_diff/
+ // discuss at: http://locutus.io/php/array_diff/
// original by: Kevin van Zonneveld (http://kvz.io)
// improved by: Sanjoy Roy
// revised by: Brett Zamir (http://brett-zamir.me)
@@ -1,5 +1,5 @@
module.exports = function array_diff_assoc (arr1) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_diff_assoc/
+ // discuss at: http://locutus.io/php/array_diff_assoc/
// original by: Kevin van Zonneveld (http://kvz.io)
// bugfixed by: 0m3r
// revised by: Brett Zamir (http://brett-zamir.me)
@@ -1,5 +1,5 @@
module.exports = function array_diff_key (arr1) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_diff_key/
+ // discuss at: http://locutus.io/php/array_diff_key/
// original by: Ates Goral (http://magnetiq.com)
// revised by: Brett Zamir (http://brett-zamir.me)
// input by: Everlasto
@@ -1,5 +1,5 @@
module.exports = function array_diff_uassoc (arr1) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_diff_uassoc/
+ // discuss at: http://locutus.io/php/array_diff_uassoc/
// original by: Brett Zamir (http://brett-zamir.me)
// example 1: var $array1 = {a: 'green', b: 'brown', c: 'blue', 0: 'red'}
// example 1: var $array2 = {a: 'GREEN', B: 'brown', 0: 'yellow', 1: 'red'}
@@ -1,5 +1,5 @@
module.exports = function array_diff_ukey (arr1) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_diff_ukey/
+ // discuss at: http://locutus.io/php/array_diff_ukey/
// original by: Brett Zamir (http://brett-zamir.me)
// example 1: var $array1 = {blue: 1, red: 2, green: 3, purple: 4}
// example 1: var $array2 = {green: 5, blue: 6, yellow: 7, cyan: 8}
@@ -1,5 +1,5 @@
module.exports = function array_fill (startIndex, num, mixedVal) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_fill/
+ // discuss at: http://locutus.io/php/array_fill/
// original by: Kevin van Zonneveld (http://kvz.io)
// improved by: Waldo Malqui Silva (http://waldo.malqui.info)
// example 1: array_fill(5, 6, 'banana')
@@ -1,5 +1,5 @@
module.exports = function array_fill_keys (keys, value) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_fill_keys/
+ // discuss at: http://locutus.io/php/array_fill_keys/
// original by: Brett Zamir (http://brett-zamir.me)
// bugfixed by: Brett Zamir (http://brett-zamir.me)
// example 1: var $keys = {'a': 'foo', 2: 5, 3: 10, 4: 'bar'}
@@ -1,5 +1,5 @@
module.exports = function array_filter (arr, func) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_filter/
+ // discuss at: http://locutus.io/php/array_filter/
// original by: Brett Zamir (http://brett-zamir.me)
// input by: max4ever
// improved by: Brett Zamir (http://brett-zamir.me)
@@ -1,5 +1,5 @@
module.exports = function array_flip (trans) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_flip/
+ // discuss at: http://locutus.io/php/array_flip/
// original by: Kevin van Zonneveld (http://kvz.io)
// improved by: Pier Paolo Ramon (http://www.mastersoup.com/)
// improved by: Brett Zamir (http://brett-zamir.me)
@@ -1,5 +1,5 @@
module.exports = function array_intersect (arr1) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_intersect/
+ // discuss at: http://locutus.io/php/array_intersect/
// original by: Brett Zamir (http://brett-zamir.me)
// note 1: These only output associative arrays (would need to be
// note 1: all numeric and counting from zero to be numeric)
@@ -1,5 +1,5 @@
module.exports = function array_intersect_assoc (arr1) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_intersect_assoc/
+ // discuss at: http://locutus.io/php/array_intersect_assoc/
// original by: Brett Zamir (http://brett-zamir.me)
// note 1: These only output associative arrays (would need to be
// note 1: all numeric and counting from zero to be numeric)
@@ -1,5 +1,5 @@
module.exports = function array_intersect_key (arr1) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_intersect_key/
+ // discuss at: http://locutus.io/php/array_intersect_key/
// original by: Brett Zamir (http://brett-zamir.me)
// note 1: These only output associative arrays (would need to be
// note 1: all numeric and counting from zero to be numeric)
@@ -1,5 +1,5 @@
module.exports = function array_intersect_uassoc (arr1) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_intersect_uassoc/
+ // discuss at: http://locutus.io/php/array_intersect_uassoc/
// original by: Brett Zamir (http://brett-zamir.me)
// example 1: var $array1 = {a: 'green', b: 'brown', c: 'blue', 0: 'red'}
// example 1: var $array2 = {a: 'GREEN', B: 'brown', 0: 'yellow', 1: 'red'}
@@ -1,5 +1,5 @@
module.exports = function array_intersect_ukey (arr1) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_intersect_ukey/
+ // discuss at: http://locutus.io/php/array_intersect_ukey/
// original by: Brett Zamir (http://brett-zamir.me)
// example 1: var $array1 = {blue: 1, red: 2, green: 3, purple: 4}
// example 1: var $array2 = {green: 5, blue: 6, yellow: 7, cyan: 8}
@@ -1,5 +1,5 @@
module.exports = function array_key_exists (key, search) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_key_exists/
+ // discuss at: http://locutus.io/php/array_key_exists/
// original by: Kevin van Zonneveld (http://kvz.io)
// improved by: Felix Geisendoerfer (http://www.debuggable.com/felix)
// example 1: array_key_exists('kevin', {'kevin': 'van Zonneveld'})
@@ -1,5 +1,5 @@
module.exports = function array_keys (input, searchValue, argStrict) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_keys/
+ // discuss at: http://locutus.io/php/array_keys/
// original by: Kevin van Zonneveld (http://kvz.io)
// input by: Brett Zamir (http://brett-zamir.me)
// input by: P
@@ -1,5 +1,5 @@
module.exports = function array_map (callback) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_map/
+ // discuss at: http://locutus.io/php/array_map/
// original by: Andrea Giammarchi (http://webreflection.blogspot.com)
// improved by: Kevin van Zonneveld (http://kvz.io)
// improved by: Brett Zamir (http://brett-zamir.me)
@@ -1,5 +1,5 @@
module.exports = function array_merge () { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_merge/
+ // discuss at: http://locutus.io/php/array_merge/
// original by: Brett Zamir (http://brett-zamir.me)
// bugfixed by: Nate
// bugfixed by: Brett Zamir (http://brett-zamir.me)
@@ -1,5 +1,5 @@
module.exports = function array_merge_recursive (arr1, arr2) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_merge_recursive/
+ // discuss at: http://locutus.io/php/array_merge_recursive/
// original by: Subhasis Deb
// input by: Brett Zamir (http://brett-zamir.me)
// bugfixed by: Kevin van Zonneveld (http://kvz.io)
@@ -1,5 +1,5 @@
module.exports = function array_multisort (arr) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_multisort/
+ // discuss at: http://locutus.io/php/array_multisort/
// original by: Theriault (https://github.com/Theriault)
// example 1: array_multisort([1, 2, 1, 2, 1, 2], [1, 2, 3, 4, 5, 6])
// returns 1: true
@@ -1,5 +1,5 @@
module.exports = function array_pad (input, padSize, padValue) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_pad/
+ // discuss at: http://locutus.io/php/array_pad/
// original by: Waldo Malqui Silva (http://waldo.malqui.info)
// example 1: array_pad([ 7, 8, 9 ], 2, 'a')
// returns 1: [ 7, 8, 9]
@@ -1,5 +1,5 @@
module.exports = function array_pop (inputArr) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_pop/
+ // discuss at: http://locutus.io/php/array_pop/
// original by: Kevin van Zonneveld (http://kvz.io)
// improved by: Kevin van Zonneveld (http://kvz.io)
// input by: Brett Zamir (http://brett-zamir.me)
@@ -1,5 +1,5 @@
module.exports = function array_product (input) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_product/
+ // discuss at: http://locutus.io/php/array_product/
// original by: Waldo Malqui Silva (http://waldo.malqui.info)
// example 1: array_product([ 2, 4, 6, 8 ])
// returns 1: 384
@@ -1,5 +1,5 @@
module.exports = function array_push (inputArr) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_push/
+ // discuss at: http://locutus.io/php/array_push/
// original by: Kevin van Zonneveld (http://kvz.io)
// improved by: Brett Zamir (http://brett-zamir.me)
// note 1: Note also that IE retains information about property position even
@@ -1,5 +1,5 @@
module.exports = function array_rand (input, numReq) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_rand/
+ // discuss at: http://locutus.io/php/array_rand/
// original by: Waldo Malqui Silva (http://waldo.malqui.info)
// example 1: array_rand( ['Kevin'], 1 )
// returns 1: 0
@@ -1,5 +1,5 @@
module.exports = function array_reduce (aInput, callback) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_reduce/
+ // discuss at: http://locutus.io/php/array_reduce/
// original by: Alfonso Jimenez (http://www.alfonsojimenez.com)
// note 1: Takes a function as an argument, not a function's name
// example 1: array_reduce([1, 2, 3, 4, 5], function (v, w){v += w;return v;})
@@ -1,5 +1,5 @@
module.exports = function array_replace (arr) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_replace/
+ // discuss at: http://locutus.io/php/array_replace/
// original by: Brett Zamir (http://brett-zamir.me)
// example 1: array_replace(["orange", "banana", "apple", "raspberry"], {0 : "pineapple", 4 : "cherry"}, {0:"grape"})
// returns 1: {0: 'grape', 1: 'banana', 2: 'apple', 3: 'raspberry', 4: 'cherry'}
@@ -1,5 +1,5 @@
module.exports = function array_replace_recursive (arr) { // eslint-disable-line camelcase
- // discuss at: http://locutusjs.io/php/array_replace_recursive/
+ // discuss at: http://locutus.io/php/array_replace_recursive/
// original by: Brett Zamir (http://brett-zamir.me)
// example 1: array_replace_recursive({'citrus' : ['orange'], 'berries' : ['blackberry', 'raspberry']}, {'citrus' : ['pineapple'], 'berries' : ['blueberry']})
// returns 1: {citrus : ['pineapple'], berries : ['blueberry', 'raspberry']}
Oops, something went wrong.

0 comments on commit 9aea421

Please sign in to comment.